package hlhj.fhp.checkpoint.atys

import hlhj.fhp.checkpoint.BaseAty
import hlhj.fhp.checkpoint.R
import hlhj.fhp.checkpoint.iview.NoticeDetailView
import hlhj.fhp.checkpoint.javaBean.NoticeDetailBean
import hlhj.fhp.checkpoint.presenter.NoticeDetailPresenter
import kotlinx.android.synthetic.main.aty_notice_detail.*
import kotlinx.android.synthetic.main.lo_pub_head.*

/**
 * Created by Never Fear   on 2018\11\19 0019.
Never More....
 */
class NoticeDetailAty :BaseAty<NoticeDetailView,NoticeDetailPresenter>(), NoticeDetailView {
    override fun initView() {
        tvTittle.text="公告详情"
    }

    override fun setDetail(noticeDetailBean: NoticeDetailBean) {
        webView.loadDataWithBaseURL(null, noticeDetailBean.info.content, "text/html", "UTF-8", null);
    }

    override fun logicStart() {
        presenter?.getDetail(intent.getIntExtra("id",-1),this)
    }

    override fun setListener() {
    }

    override fun bindView(): NoticeDetailView {
        return this
    }

    override fun createPresenter(): NoticeDetailPresenter {
        return NoticeDetailPresenter()
    }

    override val contentId: Int= R.layout.aty_notice_detail
}